﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ShowHistory.aspx.cs" Inherits="StudentAppointmentPlatform.ShowHistory" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Label runat="server" ID="History_Title" CssClass="label label-info"></asp:Label>
    <br/>
    <asp:ScriptManager runat="server"></asp:ScriptManager>
    <asp:UpdatePanel runat="server" ID="upRecords">       
        <ContentTemplate>
            <asp:GridView ID="gvRecord" runat="server" AutoGenerateColumns="False" OnRowDataBound="gvRecord_OnRowDataBound" OnRowCommand="gvRecord_OnRowCommand" DataKeyNames="AppointmentId,ServiceId" 
                AllowSorting="True" OnSorting="gvRecord_OnSorting" CssClass="table table-striped table-hover table-bordered">
                <RowStyle HorizontalAlign="Center" VerticalAlign="Middle"></RowStyle>
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                <EmptyDataTemplate>当前无数据</EmptyDataTemplate>
                <Columns>
                    <asp:TemplateField HeaderText="操作">
                        <ItemTemplate>
                            <asp:Button runat="server" ID="btnDetail" Text="详情/打印" CommandName="Detail" CommandArgument='<%# Eval("AppointmentId") %>'/>
                        </ItemTemplate>                                         
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="预约日期" DataField="Day" SortExpression="Day"/>                    
                    <asp:TemplateField HeaderText="时间段" SortExpression="TimeBucket">
                        <ItemTemplate>
                            <asp:Literal runat="server" ID="lit_TimeBucket"></asp:Literal>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="预约学生" DataField="Student" SortExpression="Student"/>
                    <asp:BoundField HeaderText="服务名称" DataField="ServiceName" SortExpression="ServiceName"/>              
                    <asp:BoundField HeaderText="负责人" DataField="Director" SortExpression="Director"/>
                    <asp:BoundField HeaderText="状态" DataField="Status" SortExpression="Status"/>
                    <asp:BoundField HeaderText="提交日期" DataField="CreatTime" DataFormatString="{0:yyyy-MM-dd HH:mm}" SortExpression="CreatTime"/>
                </Columns>
            </asp:GridView>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="FooterContent" runat="server">
</asp:Content>
